package phone.qyg.com.qyg.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 作者：lblbh on 2017/12/7 15:17
 * 邮箱：lanbuhan@163.com
 * 功能：TODO
 */
public class MapTheme implements Parcelable {

    /**
     "id": 1,
     "title": "公交",
     "color": "#20B8EA"
     */

    public int id;
    public int type;
    public String imgUrl;
    public String color;
    public String title;

    public MapTheme() {}


    public MapTheme(int id, String title, int type) {
        this.id = id;
        this.type = type;
        this.title = title;
    }

    public MapTheme(int id, String title, int type,String color,String imgUrl) {
        this.id = id;
        this.title = title;
        this.type = type;
        this.color = color;
        this.imgUrl = imgUrl;
    }

    @SuppressWarnings("unchecked")
    public MapTheme(Parcel in) {
        id = in.readInt();
        type = in.readInt();
        color = in.readString();
        title = in.readString();
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(id);
        dest.writeInt(type);
        dest.writeString(color);
        dest.writeString(title);
    }


    public static final Creator<MapTheme> CREATOR = new Creator<MapTheme>() {
        @Override
        public MapTheme[] newArray(int size) {
            return new MapTheme[size];
        }

        @Override
        public MapTheme createFromParcel(Parcel in) {
            return new MapTheme(in);
        }
    };
}
